#include "stm32f4xx.h"
#include "iic_moni.h"
#include "delay.h"
#include "structconfig.h"
#include "imu.h"
#include "led.h"

#define HMC5883L_ADDRESS  0x1E 

#define HMC5883L_CONFIG_A 0x00
#define HMC5883L_CONFIG_B 0x01
#define HMC5883L_MODE     0x02
#define HMC5883L_DATA 		0x03
#define HMC5883L_STATUS   0x09
#define HMC5883L_IDENTIFICATION_A 0x0A
#define HMC5883L_IDENTIFICATION_B 0x0B
#define HMC5883L_IDENTIFICATION_C 0x0C

extern INT16_XYZ HMC58831L_data,mag_off;
extern float mag_yaw;
void HMC58831L_Init(void);
void HMC58831L_Read(void);
